package GUI;

import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.border.Border;

@SuppressWarnings("serial")
public class ModePanel extends JPanel {
	public static String currentMode = "Draw";
	
	public ModePanel(ButtonsPanel buttonsPanel){
		// row, column
		setLayout(new GridLayout(1, 0));
		Border border = BorderFactory.createTitledBorder("Mode");
		setBorder(border);
		
		ButtonGroup group = new ButtonGroup();
		JRadioButton drawRadioB = new JRadioButton("Draw");
		drawRadioB.setSelected(true);
		add(drawRadioB);
		group.add(drawRadioB);
		drawRadioB.addActionListener(buttonsPanel.new ModePanelActionListener());
		
		//Select mode button
		JRadioButton editRadioB = new JRadioButton("Edit");
		add(editRadioB);
		group.add(editRadioB);
		editRadioB.addActionListener(buttonsPanel.new ModePanelActionListener());
	}
	
}
